Skip to content

HYPERFLEET-1371 - refactor: remove environments framework, unify startup - #327

Open
kuudori wants to merge 4 commits into
openshift-hyperfleet:mainfrom
kuudori:HYPERFLEET-1371-remove-environments
Open

HYPERFLEET-1371 - refactor: remove environments framework, unify startup#327
kuudori wants to merge 4 commits into
openshift-hyperfleet:mainfrom
kuudori:HYPERFLEET-1371-remove-environments

Conversation

@kuudori

@kuudori kuudori commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove the environments framework and its registry in favor of direct container-based dependency injection
  • Replace runServe with a linear composition root using pkg/closer for LIFO ordered shutdown
  • Move tracing env vars (HYPERFLEET_TRACING_ENABLED, OTEL_SERVICE_NAME) from raw os.Getenv into the Viper config system as a top-level Tracing config section
  • Remove deprecated HYPERFLEET_LOGGING_OTEL_ENABLED / HYPERFLEET_LOGGING_OTEL_SAMPLING_RATE warning blocks
  • Container getters now panic on construction failure instead of returning errors (startup-only, unrecoverable)
  • Remove redundant tracingEnabled param from BuildAPIServer and dbPingTimeout from NewHealthServer - both already available via cfg

Test plan

  • make verify-all passes (1436 tests, lint, vet)
  • make test-helm passes (21 chart tests)
  • make test-integration passes
  • Deploy to dev and verify startup logs, readyz/healthz, graceful shutdown

Replace the environments framework with direct container-based dependency
injection and a linear composition root. Move tracing env vars into the
Viper config system and introduce pkg/closer for ordered shutdown.
@openshift-ci
openshift-ci Bot requested review from jsell-rh and mbrudnoy August 5, 2026 22:08
@openshift-ci

openshift-ci Bot commented Aug 5, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mischulee for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔄 Running review...
📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added configurable API tracing with service-name support.
    • Added configurable TLS settings for health and metrics services.
    • Improved graceful shutdown with request draining, bounded timeouts, and centralized cleanup.
  • Bug Fixes

    • Server startup and runtime errors are now reported clearly.
    • Caller identity enforcement applies consistently across request paths.
    • Invalid route configurations return errors instead of causing panics.
  • Documentation

    • Updated deployment, development, authentication, testing, and chart guidance.
    • Clarified no-auth startup behavior and Kubernetes shutdown timing.

Walkthrough

The change replaces environment-driven startup with explicit configuration, dependency injection, and coordinated server shutdown. It adds tracing configuration and a concurrency-safe cleanup manager. API, health, and metrics servers share error-returning lifecycle methods. Integration tests now manage Testcontainers database setup and cleanup. Documentation, Helm values, Make targets, and test guidance reflect the new runtime model.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ServeCommand
  participant APIServer
  participant HealthServer
  participant MetricsServer
  participant Closer
  ServeCommand->>APIServer: Start()
  ServeCommand->>HealthServer: Start()
  ServeCommand->>MetricsServer: Start()
  APIServer-->>ServeCommand: NotifyListening()
  HealthServer-->>ServeCommand: NotifyListening()
  MetricsServer-->>ServeCommand: NotifyListening()
  ServeCommand->>APIServer: Shutdown(ctx)
  ServeCommand->>HealthServer: Shutdown(ctx)
  ServeCommand->>MetricsServer: Shutdown(ctx)
  ServeCommand->>Closer: Close()
Loading

Suggested reviewers: jsell-rh, mbrudnoy, rafabene

🚥 Pre-merge checks | ✅ 10 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 18.18% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (10 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Sec-02: Secrets In Log Output ✅ Passed No production log call uses token, password, credential, or secret as a field; the audit found COUNT=0. Config and request-header outputs use redaction/masking.
No Hardcoded Secrets ✅ Passed Full feature-range scans found no private keys, credential-bearing URLs, or non-test secret literals; only password: test and a test database fallback in integration-test code/config.
No Weak Cryptography ✅ Passed No CWE-327/CWE-208 issue is introduced: the diff has no MD5, DES, RC4, SHA-1, ECB, custom crypto, or secret comparisons; JWT verification remains restricted to RS256.
No Injection Vectors ✅ Passed Changed production code contains no exec.Command, template.HTML, or yaml.Unmarshal; added SQL construction appears only in test/helper.go, which the rule excludes.
No Privileged Containers ✅ Passed No privileged, host namespace, SYS_ADMIN, or privilege-escalation settings exist. Dockerfile USER root is justified for builder setup and switches to non-root; Helm defaults use UID 65532 (CWE-250...
No Pii Or Sensitive Data In Logs ✅ Passed Full PR logging scan found no PII, session IDs, or raw request/response bodies; new logs contain operational metadata, and config dump redacts database username/password.
Title check ✅ Passed The title clearly identifies the removal of the environments framework and the startup refactor, which are the main changes.
Description check ✅ Passed The description directly explains the environments removal, dependency injection, startup refactor, tracing changes, and test results.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

Comment @coderabbitai help to get the list of available commands.

@hyperfleet-ci-bot

hyperfleet-ci-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

Risk Score: 5 — risk/high

Signal Detail Points
PR size 3443 lines (>500) +2
Sensitive paths cmd/ +2
Test coverage Missing tests for: cmd/hyperfleet-api/environments/registry cmd/hyperfleet-api/servecmd pkg/auth pkg/db/db_session test test/mocks +1

Computed by hyperfleet-risk-scorer

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

🧹 Nitpick comments (5)
cmd/hyperfleet-api/server/health_server.go (1)

72-74: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Compare with errors.Is(err, http.ErrServerClosed).

Direct equality misses a wrapped sentinel. Serve/ServeTLS return the bare sentinel today, but any future wrapping turns a normal shutdown into a reported failure, and cmd.go propagates that as the process exit error. metrics_server.go line 64 carries the same comparison; fix both.

♻️ Proposed fix
-	if err != nil && err != http.ErrServerClosed {
+	if err != nil && !errors.Is(err, http.ErrServerClosed) {
 		return fmt.Errorf("health server terminated with errors: %w", err)
 	}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmd/hyperfleet-api/server/health_server.go` around lines 72 - 74, Update the
shutdown checks in the health server’s error handling and the corresponding
metrics server logic to use errors.Is(err, http.ErrServerClosed) instead of
direct equality, preserving normal shutdown behavior even when the sentinel is
wrapped.

Source: Path instructions

cmd/hyperfleet-api/servecmd/cmd.go (1)

134-161: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Collapse the three drain callbacks into one helper.

Lines 134-141, 144-151, and 154-161 repeat the same shape: bounded Shutdown, join with Close on failure. runServe already exceeds 50 lines with many branching paths, which the coding standard flags for decomposition.

♻️ Proposed helper
+func addGracefulShutdown(c *closer.Closer, srv server.Server, budget time.Duration) {
+	c.Add(func() error {
+		drainCtx, cancel := context.WithTimeout(context.Background(), budget)
+		defer cancel()
+		if err := srv.Shutdown(drainCtx); err != nil {
+			return errors.Join(err, srv.Close())
+		}
+		return nil
+	})
+}

Then at the call sites:

-	c.Add(func() error {
-		drainCtx, cancel := context.WithTimeout(context.Background(), cfg.Health.ShutdownTimeout)
-		defer cancel()
-		if err := apiServer.Shutdown(drainCtx); err != nil {
-			return errors.Join(err, apiServer.Close())
-		}
-		return nil
-	})
+	addGracefulShutdown(c, apiServer, cfg.Health.ShutdownTimeout)
 
 	metricsServer := server.NewMetricsServer(cfg.Metrics)
-	c.Add(func() error {
-		drainCtx, cancel := context.WithTimeout(context.Background(), metricsDrainTimeout)
-		defer cancel()
-		if err := metricsServer.Shutdown(drainCtx); err != nil {
-			return errors.Join(err, metricsServer.Close())
-		}
-		return nil
-	})
+	addGracefulShutdown(c, metricsServer, metricsDrainTimeout)
 
 	healthServer := server.NewHealthServer(cfg.Health, ctr.SessionFactory())
-	c.Add(func() error {
-		drainCtx, cancel := context.WithTimeout(context.Background(), healthDrainTimeout)
-		defer cancel()
-		if err := healthServer.Shutdown(drainCtx); err != nil {
-			return errors.Join(err, healthServer.Close())
-		}
-		return nil
-	})
+	addGracefulShutdown(c, healthServer, healthDrainTimeout)

Keep the existing comment at lines 131-133 above the helper so the "never register Close bare" rule stays documented.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmd/hyperfleet-api/servecmd/cmd.go` around lines 134 - 161, Extract the
repeated shutdown-and-close logic from the three callbacks in runServe into one
helper that accepts the server, drain timeout, and returns the bounded Shutdown
error joined with Close on failure. Register each callback through this helper
for apiServer, metricsServer, and healthServer, while preserving the existing
comment above the helper documenting why Close must not be registered bare.

Source: Path instructions

cmd/hyperfleet-api/container/db.go (1)

8-17: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Make SetSessionFactory reject or close an already-constructed factory.

SessionFactory() caches a production factory on first call. SetSessionFactory then overwrites that field without closing the previous value. If any code path touches SessionFactory() before injection (test harness, future wiring), the process opens a production connection pool that nobody closes and nobody can reach.

The lazy assignment is also unsynchronized. Today the reviewed callers invoke it on the main goroutine before servers start, so no race is proven; keep it that way or add a mutex if any getter moves onto a request path.

♻️ Proposed guard
 func (c *Container) SetSessionFactory(sf db.SessionFactory) {
+	if c.sessionFactory != nil {
+		panic("container: session factory already constructed; inject before first use")
+	}
 	c.sessionFactory = sf
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmd/hyperfleet-api/container/db.go` around lines 8 - 17, Update
Container.SetSessionFactory to handle an existing cached factory before
replacing it: reject the replacement or close the previously constructed factory
so a production factory created by SessionFactory is never orphaned. Preserve
the lazy caching behavior in SessionFactory, and keep access serialized as
currently assumed or add synchronization if the getter is moved to a concurrent
request path.

Source: Coding guidelines

pkg/config/logging_test.go (1)

44-44: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Exercise tracing overrides instead of only the default.

The test body does not set a tracing-specific environment value, so Tracing.Enabled == true may only verify NewTracingConfig()'s default. Add table-driven cases for HYPERFLEET_TRACING_ENABLED, HYPERFLEET_TRACING_SERVICE_NAME, and OTEL_SERVICE_NAME, including precedence when both service-name variables are set. Rename the test to reflect its tracing coverage.

As per path instructions: **/*_test.go requires tests for new critical configuration paths and favors table-driven scenarios.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/config/logging_test.go` at line 44, Rename the tracing configuration test
to reflect override coverage and convert it to table-driven cases. Exercise
HYPERFLEET_TRACING_ENABLED, HYPERFLEET_TRACING_SERVICE_NAME, and
OTEL_SERVICE_NAME, including the expected precedence when both service-name
variables are set, while retaining assertions for the resulting Tracing fields.

Source: Path instructions

test/testdata/integration-config.yaml (1)

4-8: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Document the runtime overrides in this fixture.

jwk_cert_url is a placeholder. test/helper.go line 175 replaces it with the JWK mock URL. identity_header is absent here and test/helper.go lines 223-227 injects defaultTestIdentityHeader. Both couplings are invisible to a reader of this file. Add comments, and set identity_header explicitly so the fixture matches what the suite runs.

Proposed fixture annotation
 server:
   jwt:
     enabled: true
     configs:
+      # jwk_cert_url is replaced at runtime by the JWK mock server URL (test/helper.go).
       - issuer_url: https://test-issuer.example.com
         jwk_cert_url: https://jwks.invalid/.well-known/jwks.json
         header: Authorization
         identity_claim: email
+        identity_header: X-Hyperfleet-Identity

Match identity_header to the value of defaultTestIdentityHeader.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/testdata/integration-config.yaml` around lines 4 - 8, Update the
integration config fixture’s config entry to include identity_header with the
value defined by defaultTestIdentityHeader, and add comments documenting that
jwk_cert_url is replaced by the JWK mock URL and identity_header is injected or
overridden by test/helper.go at runtime. Keep the fixture values aligned with
the suite’s effective runtime configuration.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Line 1: Update the top-level heading in AGENTS.md from “CLAUDE.md” to
“AGENTS.md” so the document identifies itself correctly.

In `@cmd/hyperfleet-api/servecmd/cmd.go`:
- Around line 186-201: Update the startup select flow around
healthServer.NotifyListening and serverResults to also await an API
listener-ready signal from APIServer.Start. Track health and API listening
independently, and call health.GetReadinessState().SetReady only after both
signals have completed; preserve context, signal, and startup-error handling
while ensuring API binding failures prevent readiness.

In `@cmd/hyperfleet-api/server/api_server.go`:
- Around line 46-50: Update the invalid-TLS branch in the server startup flow to
handle the error returned by listener.Close instead of discarding it. Combine or
otherwise propagate the close error with the existing certificate/key
configuration error while preserving the current cleanup and failure behavior.

In `@cmd/hyperfleet-api/server/health_server.go`:
- Around line 36-40: Configure ReadTimeout, WriteTimeout, and IdleTimeout on the
http.Server instances created by NewHealthServer in
cmd/hyperfleet-api/server/health_server.go (lines 36-40) and NewMetricsServer in
cmd/hyperfleet-api/server/metrics_server.go (lines 30-34), using the project’s
appropriate timeout values while preserving the existing handlers and addresses.

In `@Makefile`:
- Around line 216-234: Update each gotestsum invocation in the test targets
around ci-test-unit and ci-test-integration, including the corresponding regular
unit and integration targets, to run with CGO_ENABLED=1 and
GOEXPERIMENT=boringcrypto. Apply both environment variables directly to every
command so the install prerequisite does not determine the test binary build
configuration.

In `@pkg/config/health.go`:
- Around line 67-69: Rename HealthConfig.GetDBPingTimeout to PingTimeout, then
update the health-server interface and every call site to use the new method
while preserving its existing return value. Do not use DBPingTimeout, which
conflicts with the struct field.

In `@pkg/config/loader.go`:
- Line 312: Handle the error returned by BindEnv in bindAllEnvVars instead of
suppressing it with nolint. Propagate the error by updating bindAllEnvVars and
its callers as needed, or explicitly fail fast after checking it, while
preserving the existing environment binding behavior.

In `@test/helper.go`:
- Around line 171-191: Remove the zero-value testing.T dependency from the
helper setup around NewJWKCertServerMock and Helper.T. Update the JWK mock error
path to return an HTTP error response instead of calling methods on testing.T,
and eliminate any reliance on the &testing.T{} instance while preserving normal
test failure handling.

---

Nitpick comments:
In `@cmd/hyperfleet-api/container/db.go`:
- Around line 8-17: Update Container.SetSessionFactory to handle an existing
cached factory before replacing it: reject the replacement or close the
previously constructed factory so a production factory created by SessionFactory
is never orphaned. Preserve the lazy caching behavior in SessionFactory, and
keep access serialized as currently assumed or add synchronization if the getter
is moved to a concurrent request path.

In `@cmd/hyperfleet-api/servecmd/cmd.go`:
- Around line 134-161: Extract the repeated shutdown-and-close logic from the
three callbacks in runServe into one helper that accepts the server, drain
timeout, and returns the bounded Shutdown error joined with Close on failure.
Register each callback through this helper for apiServer, metricsServer, and
healthServer, while preserving the existing comment above the helper documenting
why Close must not be registered bare.

In `@cmd/hyperfleet-api/server/health_server.go`:
- Around line 72-74: Update the shutdown checks in the health server’s error
handling and the corresponding metrics server logic to use errors.Is(err,
http.ErrServerClosed) instead of direct equality, preserving normal shutdown
behavior even when the sentinel is wrapped.

In `@pkg/config/logging_test.go`:
- Line 44: Rename the tracing configuration test to reflect override coverage
and convert it to table-driven cases. Exercise HYPERFLEET_TRACING_ENABLED,
HYPERFLEET_TRACING_SERVICE_NAME, and OTEL_SERVICE_NAME, including the expected
precedence when both service-name variables are set, while retaining assertions
for the resulting Tracing fields.

In `@test/testdata/integration-config.yaml`:
- Around line 4-8: Update the integration config fixture’s config entry to
include identity_header with the value defined by defaultTestIdentityHeader, and
add comments documenting that jwk_cert_url is replaced by the JWK mock URL and
identity_header is injected or overridden by test/helper.go at runtime. Keep the
fixture values aligned with the suite’s effective runtime configuration.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 6316064b-2ef8-41bf-8185-a2be89858e69

📥 Commits

Reviewing files that changed from the base of the PR and between cf39733 and 93ed5d3.

⛔ Files ignored due to path filters (1)
  • test/support/jwt_ca.pem is excluded by !**/*.pem
📒 Files selected for processing (49)
  • AGENTS.md
  • CLAUDE.md
  • CONTRIBUTING.md
  • Makefile
  • charts/README.md
  • charts/templates/configmap.yaml
  • charts/values.yaml
  • cmd/hyperfleet-api/container/auth.go
  • cmd/hyperfleet-api/container/container.go
  • cmd/hyperfleet-api/container/container_test.go
  • cmd/hyperfleet-api/container/daos.go
  • cmd/hyperfleet-api/container/db.go
  • cmd/hyperfleet-api/container/validation.go
  • cmd/hyperfleet-api/environments/e_development.go
  • cmd/hyperfleet-api/environments/e_integration_testing.go
  • cmd/hyperfleet-api/environments/e_production.go
  • cmd/hyperfleet-api/environments/e_unit_testing.go
  • cmd/hyperfleet-api/environments/framework.go
  • cmd/hyperfleet-api/environments/framework_test.go
  • cmd/hyperfleet-api/environments/registry/registry.go
  • cmd/hyperfleet-api/environments/types.go
  • cmd/hyperfleet-api/servecmd/api_server.go
  • cmd/hyperfleet-api/servecmd/cmd.go
  • cmd/hyperfleet-api/server/api_server.go
  • cmd/hyperfleet-api/server/api_server_test.go
  • cmd/hyperfleet-api/server/health_server.go
  • cmd/hyperfleet-api/server/metrics_server.go
  • cmd/hyperfleet-api/server/routes_entities.go
  • cmd/hyperfleet-api/server/server.go
  • docs/authentication.md
  • docs/deployment.md
  • docs/development.md
  • docs/logging.md
  • docs/testcontainers.md
  • pkg/closer/closer.go
  • pkg/closer/closer_test.go
  • pkg/config/config.go
  • pkg/config/dump.go
  • pkg/config/health.go
  • pkg/config/loader.go
  • pkg/config/logging.go
  • pkg/config/logging_test.go
  • pkg/config/metrics.go
  • pkg/config/tracing.go
  • test/CLAUDE.md
  • test/helper.go
  • test/integration/caller_identity_test.go
  • test/support/certs.json
  • test/testdata/integration-config.yaml
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift-hyperfleet/architecture (manual)
  • openshift-hyperfleet/hyperfleet-api (manual)
  • openshift-hyperfleet/hyperfleet-sentinel (manual)
  • openshift-hyperfleet/hyperfleet-adapter (manual)
  • openshift-hyperfleet/hyperfleet-broker (manual)
💤 Files with no reviewable changes (10)
  • cmd/hyperfleet-api/environments/e_integration_testing.go
  • test/support/certs.json
  • pkg/config/logging.go
  • cmd/hyperfleet-api/environments/e_production.go
  • cmd/hyperfleet-api/environments/types.go
  • cmd/hyperfleet-api/environments/framework.go
  • cmd/hyperfleet-api/environments/e_development.go
  • cmd/hyperfleet-api/environments/framework_test.go
  • cmd/hyperfleet-api/environments/registry/registry.go
  • cmd/hyperfleet-api/environments/e_unit_testing.go

Comment thread AGENTS.md Outdated
Comment thread cmd/hyperfleet-api/servecmd/cmd.go
Comment thread cmd/hyperfleet-api/server/api_server.go Outdated
Comment thread cmd/hyperfleet-api/server/health_server.go Outdated
Comment thread Makefile
Comment thread pkg/config/health.go Outdated
Comment thread pkg/config/loader.go Outdated
Comment thread test/helper.go Outdated
kuudori added 2 commits August 5, 2026 18:29
- Use errors.Is for http.ErrServerClosed in all three servers
- Extract addDrain helper for repeated shutdown callbacks
- Add table-driven tracing config env var tests
- Add identity_header to integration config fixture

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
test/helper.go (1)

230-235: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Call Close only after a drain timeout.

Line 234 force-closes the API server for every Shutdown error. Return unexpected shutdown errors. Call Close only when Shutdown timed out.

Proposed fix
 		if shutdownErr := helper.APIServer.Shutdown(drainCtx); shutdownErr != nil {
-			return errors.Join(shutdownErr, helper.APIServer.Close())
+			if errors.Is(shutdownErr, context.DeadlineExceeded) {
+				return errors.Join(shutdownErr, helper.APIServer.Close())
+			}
+			return shutdownErr
 		}

As per coding guidelines, "Close() only as the force-close fallback after shutdown times out."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/helper.go` around lines 230 - 235, Update the helper.closer cleanup
callback around helper.APIServer.Shutdown so Close is invoked only when the
shutdown error indicates the drain context timed out; return other shutdown
errors directly without force-closing, while preserving normal successful
shutdown behavior.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cmd/hyperfleet-api/server/routes_entities.go`:
- Around line 43-44: Update the error handling around registerPerEntityRoutes in
RegisterEntityRoutes to wrap the returned error with a message identifying
RegisterEntityRoutes as the failed operation, using %w to preserve the original
cause instead of returning err directly.

In `@cmd/hyperfleet-api/server/server.go`:
- Around line 63-69: Update baseServer.Start so the configured TLS certificate
and key are loaded and validated before closing s.listening. Ensure
certificate/key errors return from startup and prevent NotifyListening
publication, while preserving normal listener serving after successful
validation.

In `@pkg/config/logging_test.go`:
- Around line 75-78: Extend the service-name precedence table in the logging
configuration tests to set both HYPERFLEET_TRACING_SERVICE_NAME and
OTEL_SERVICE_NAME, expecting the OTEL_SERVICE_NAME value. Preserve the existing
single-variable coverage and use the established test-case structure.

In `@test/integration/integration_test.go`:
- Around line 109-121: Ensure the integration setup immediately defers or
centralizes termination of pgContainer after postgres.Run succeeds, and route
every subsequent failure through that cleanup path. Handle errors from Host,
MappedPort, and both os.Setenv calls before exiting, terminating pgContainer
before os.Exit(1) on each failure.

In `@test/mocks/jwk_cert_server.go`:
- Line 36: Check and handle the error returned by fmt.Fprintf in the JWK
response handler before returning, using the existing handler’s error-handling
conventions and ensuring failed client writes are not discarded.

---

Outside diff comments:
In `@test/helper.go`:
- Around line 230-235: Update the helper.closer cleanup callback around
helper.APIServer.Shutdown so Close is invoked only when the shutdown error
indicates the drain context timed out; return other shutdown errors directly
without force-closing, while preserving normal successful shutdown behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 0688a445-1dd5-4a32-b4b5-e5d4c12aaf11

📥 Commits

Reviewing files that changed from the base of the PR and between 93ed5d3 and 50b1ddd.

📒 Files selected for processing (21)
  • AGENTS.md
  • cmd/hyperfleet-api/container/db.go
  • cmd/hyperfleet-api/servecmd/cmd.go
  • cmd/hyperfleet-api/server/api_server.go
  • cmd/hyperfleet-api/server/health_server.go
  • cmd/hyperfleet-api/server/metrics_server.go
  • cmd/hyperfleet-api/server/routes_entities.go
  • cmd/hyperfleet-api/server/server.go
  • pkg/auth/auth_middleware.go
  • pkg/auth/identity.go
  • pkg/auth/jwt_handler.go
  • pkg/config/health.go
  • pkg/config/loader.go
  • pkg/config/logging_test.go
  • pkg/db/db_session/testcontainer.go
  • test/helper.go
  • test/integration/advisory_locks_test.go
  • test/integration/integration_test.go
  • test/mocks/jwk_cert_server.go
  • test/registration.go
  • test/testdata/integration-config.yaml
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift-hyperfleet/architecture (manual)
  • openshift-hyperfleet/hyperfleet-api (manual)
  • openshift-hyperfleet/hyperfleet-sentinel (manual)
  • openshift-hyperfleet/hyperfleet-adapter (manual)
  • openshift-hyperfleet/hyperfleet-broker (manual)
💤 Files with no reviewable changes (4)
  • pkg/db/db_session/testcontainer.go
  • cmd/hyperfleet-api/container/db.go
  • pkg/auth/auth_middleware.go
  • pkg/auth/identity.go
🚧 Files skipped from review as they are similar to previous changes (3)
  • pkg/config/health.go
  • AGENTS.md
  • cmd/hyperfleet-api/servecmd/cmd.go

Comment thread cmd/hyperfleet-api/server/routes_entities.go Outdated
Comment thread cmd/hyperfleet-api/server/server.go
Comment thread pkg/config/logging_test.go
Comment thread test/integration/integration_test.go
if _, err := fmt.Fprintf(w, `{"keys":[%s]}`, string(jwkBytes)); err != nil {
t.Errorf("error writing jwk response: %v", err)
}
fmt.Fprintf(w, `{"keys":[%s]}`, string(jwkBytes))

@coderabbitai coderabbitai Bot Aug 6, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Check the response write error.

Line 36 discards the error from fmt.Fprintf. A failed client write is an exceptional condition. Check it before returning. This is CWE-703.

Proposed fix
-			fmt.Fprintf(w, `{"keys":[%s]}`, string(jwkBytes))
+			if _, err := fmt.Fprintf(w, `{"keys":[%s]}`, string(jwkBytes)); err != nil {
+				return
+			}

As per path instructions, "every error return MUST be checked."

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
fmt.Fprintf(w, `{"keys":[%s]}`, string(jwkBytes))
if _, err := fmt.Fprintf(w, `{"keys":[%s]}`, string(jwkBytes)); err != nil {
return
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/mocks/jwk_cert_server.go` at line 36, Check and handle the error
returned by fmt.Fprintf in the JWK response handler before returning, using the
existing handler’s error-handling conventions and ensuring failed client writes
are not discarded.

Source: Path instructions

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test mock HTTP handler writing to a test client

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

fd -t f '.*_test\.go$' test/mocks test 2>/dev/null | sort
printf '\n--- JWK mock call sites ---\n'
rg -n -C 4 '\bNewJWKCertServerMock\s*\(' test
printf '\n--- mock test outlines ---\n'
fd -t f '.*_test\.go$' test/mocks -x ast-grep outline {} --items all

Length of output: 2381


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- helper JWK setup ---'
sed -n '120,180p' test/helper.go
printf '%s\n' '--- module Go version and JWK dependency ---'
rg -n -C 2 '^(go |.*gojwk)' go.mod go.sum
printf '%s\n' '--- existing RSA key generation in tests ---'
rg -n -C 3 '\brsa\.GenerateKey\s*\(' test pkg cmd

Length of output: 12401


@kuudori, add test/mocks/jwk_cert_server_test.go with this success-path test:

package mocks

import (
	"crypto/rand"
	"crypto/rsa"
	"encoding/json"
	"net/http"
	"testing"
)

func TestNewJWKCertServerMockServesJWK(t *testing.T) {
	privateKey, err := rsa.GenerateKey(rand.Reader, 2048)
	if err != nil {
		t.Fatalf("generate RSA key: %v", err)
	}

	url, teardown := NewJWKCertServerMock(&privateKey.PublicKey, "test-kid", "RS256")
	t.Cleanup(func() {
		if err := teardown(); err != nil {
			t.Errorf("close JWK server: %v", err)
		}
	})

	response, err := http.Get(url)
	if err != nil {
		t.Fatalf("request JWK endpoint: %v", err)
	}
	defer response.Body.Close()

	if response.StatusCode != http.StatusOK {
		t.Fatalf("unexpected status: got %d, want %d", response.StatusCode, http.StatusOK)
	}

	var jwks struct {
		Keys []struct {
			Kid string `json:"kid"`
			Alg string `json:"alg"`
		} `json:"keys"`
	}
	if err := json.NewDecoder(response.Body).Decode(&jwks); err != nil {
		t.Fatalf("decode JWK response: %v", err)
	}

	if len(jwks.Keys) != 1 {
		t.Fatalf("unexpected key count: got %d, want 1", len(jwks.Keys))
	}
	if jwks.Keys[0].Kid != "test-kid" {
		t.Errorf("unexpected key ID: got %q, want %q", jwks.Keys[0].Kid, "test-kid")
	}
	if jwks.Keys[0].Alg != "RS256" {
		t.Errorf("unexpected algorithm: got %q, want %q", jwks.Keys[0].Alg, "RS256")
	}
}

This test validates the response write to an HTTP test client. It does not exercise a failed fmt.Fprintf write, because an ordinary HTTP client does not reliably force http.ResponseWriter.Write to fail.

You are interacting with an AI system.

@kuudori
kuudori force-pushed the HYPERFLEET-1371-remove-environments branch from 50b1ddd to 0b0c4f8 Compare August 6, 2026 14:28
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

♻️ Duplicate comments (1)
cmd/hyperfleet-api/server/server.go (1)

63-70: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Readiness is published before the TLS material is validated.

Start() closes s.listening at Line 68. Serve() then fails on two paths: the empty cert/key guard at Lines 42-48, and a ServeTLS failure on an unreadable or mismatched key pair. In both cases readiness is already signaled, so servecmd can mark the process ready while the API server never serves traffic. Load the key pair with tls.LoadX509KeyPair before you close s.listening, and return the error from Start().

This repeats a finding from an earlier commit.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmd/hyperfleet-api/server/server.go` around lines 63 - 70, The Start method
publishes readiness before TLS credentials are validated. Load and validate the
certificate/key pair with tls.LoadX509KeyPair before closing s.listening, return
any validation error from Start, and ensure Serve/ServeTLS reuses the validated
material without signaling readiness when startup fails.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/closer/closer_test.go`:
- Line 170: Update the cleanup call in the closer test to assert that c.Close()
succeeds using the test framework’s expectation, replacing the discarded return
value while preserving the existing cleanup flow.
- Line 16: Update the test loop around c.Close() to capture and assert that
Close returns no error, rather than discarding its result. Preserve the existing
iteration behavior and test expectations.

In `@test/helper.go`:
- Around line 146-160: The setup helper leaks resources because cleanup is
registered only after later panic points in the same flow. Update the logic
around ctr.SessionFactory(), db.Migrate, NewJWKCertServerMock, and closer.New()
so the closer is created first and each teardown (ctr.SessionFactory().Close and
jwkTeardown) is added immediately after the corresponding resource is created,
before any validation or panic can occur. Keep the existing setup behavior
unchanged otherwise.
- Around line 440-466: Update orderTablesByDependencies to skip foreign-key
edges whose TableName equals ReferencedName or whose ReferencedName is not
present in the requested tables/dependencies map, before appending the
dependency. Preserve system-table filtering and ensure only in-scope,
non-self-referencing edges affect ordering and subsequent DropTable calls.
- Around line 189-200: Update the Helper startup cleanup registration so
pgContainer termination is added to helper.closer before any startup failure can
invoke failStartup. Ensure failStartup continues closing helper.closer and
exiting via os.Exit(1), without relying on post-NewHelper cleanup or replacing
the exit with a panic.

---

Duplicate comments:
In `@cmd/hyperfleet-api/server/server.go`:
- Around line 63-70: The Start method publishes readiness before TLS credentials
are validated. Load and validate the certificate/key pair with
tls.LoadX509KeyPair before closing s.listening, return any validation error from
Start, and ensure Serve/ServeTLS reuses the validated material without signaling
readiness when startup fails.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: b8c793d1-c689-425b-8297-2e47f4be5841

📥 Commits

Reviewing files that changed from the base of the PR and between cf39733 and 0b0c4f8.

⛔ Files ignored due to path filters (1)
  • test/support/jwt_ca.pem is excluded by !**/*.pem
📒 Files selected for processing (57)
  • AGENTS.md
  • CLAUDE.md
  • CONTRIBUTING.md
  • Makefile
  • charts/README.md
  • charts/templates/configmap.yaml
  • charts/values.yaml
  • cmd/hyperfleet-api/container/auth.go
  • cmd/hyperfleet-api/container/container.go
  • cmd/hyperfleet-api/container/container_test.go
  • cmd/hyperfleet-api/container/daos.go
  • cmd/hyperfleet-api/container/db.go
  • cmd/hyperfleet-api/container/validation.go
  • cmd/hyperfleet-api/environments/e_development.go
  • cmd/hyperfleet-api/environments/e_integration_testing.go
  • cmd/hyperfleet-api/environments/e_production.go
  • cmd/hyperfleet-api/environments/e_unit_testing.go
  • cmd/hyperfleet-api/environments/framework.go
  • cmd/hyperfleet-api/environments/framework_test.go
  • cmd/hyperfleet-api/environments/registry/registry.go
  • cmd/hyperfleet-api/environments/types.go
  • cmd/hyperfleet-api/servecmd/api_server.go
  • cmd/hyperfleet-api/servecmd/cmd.go
  • cmd/hyperfleet-api/server/api_server.go
  • cmd/hyperfleet-api/server/api_server_test.go
  • cmd/hyperfleet-api/server/health_server.go
  • cmd/hyperfleet-api/server/metrics_server.go
  • cmd/hyperfleet-api/server/routes_entities.go
  • cmd/hyperfleet-api/server/server.go
  • docs/authentication.md
  • docs/deployment.md
  • docs/development.md
  • docs/logging.md
  • docs/testcontainers.md
  • pkg/auth/auth_middleware.go
  • pkg/auth/identity.go
  • pkg/auth/jwt_handler.go
  • pkg/closer/closer.go
  • pkg/closer/closer_test.go
  • pkg/config/config.go
  • pkg/config/dump.go
  • pkg/config/health.go
  • pkg/config/loader.go
  • pkg/config/logging.go
  • pkg/config/logging_test.go
  • pkg/config/metrics.go
  • pkg/config/tracing.go
  • pkg/db/db_session/testcontainer.go
  • test/CLAUDE.md
  • test/helper.go
  • test/integration/advisory_locks_test.go
  • test/integration/caller_identity_test.go
  • test/integration/integration_test.go
  • test/mocks/jwk_cert_server.go
  • test/registration.go
  • test/support/certs.json
  • test/testdata/integration-config.yaml
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift-hyperfleet/architecture (manual)
  • openshift-hyperfleet/hyperfleet-api (manual)
  • openshift-hyperfleet/hyperfleet-sentinel (manual)
  • openshift-hyperfleet/hyperfleet-adapter (manual)
  • openshift-hyperfleet/hyperfleet-broker (manual)
💤 Files with no reviewable changes (13)
  • pkg/auth/identity.go
  • cmd/hyperfleet-api/environments/e_integration_testing.go
  • cmd/hyperfleet-api/environments/framework_test.go
  • pkg/auth/auth_middleware.go
  • test/support/certs.json
  • cmd/hyperfleet-api/environments/registry/registry.go
  • cmd/hyperfleet-api/environments/e_production.go
  • cmd/hyperfleet-api/environments/e_development.go
  • pkg/db/db_session/testcontainer.go
  • pkg/config/logging.go
  • cmd/hyperfleet-api/environments/types.go
  • cmd/hyperfleet-api/environments/e_unit_testing.go
  • cmd/hyperfleet-api/environments/framework.go
🚧 Files skipped from review as they are similar to previous changes (39)
  • pkg/auth/jwt_handler.go
  • docs/logging.md
  • cmd/hyperfleet-api/container/db.go
  • CLAUDE.md
  • pkg/config/dump.go
  • pkg/config/health.go
  • pkg/config/tracing.go
  • test/integration/advisory_locks_test.go
  • test/testdata/integration-config.yaml
  • docs/authentication.md
  • pkg/config/metrics.go
  • docs/deployment.md
  • charts/README.md
  • cmd/hyperfleet-api/server/metrics_server.go
  • pkg/config/config.go
  • cmd/hyperfleet-api/container/auth.go
  • AGENTS.md
  • test/integration/integration_test.go
  • charts/values.yaml
  • cmd/hyperfleet-api/container/container_test.go
  • test/mocks/jwk_cert_server.go
  • cmd/hyperfleet-api/servecmd/api_server.go
  • cmd/hyperfleet-api/container/daos.go
  • charts/templates/configmap.yaml
  • cmd/hyperfleet-api/server/api_server_test.go
  • docs/development.md
  • cmd/hyperfleet-api/servecmd/cmd.go
  • test/CLAUDE.md
  • pkg/config/logging_test.go
  • test/registration.go
  • test/integration/caller_identity_test.go
  • pkg/closer/closer.go
  • CONTRIBUTING.md
  • cmd/hyperfleet-api/server/health_server.go
  • cmd/hyperfleet-api/container/validation.go
  • cmd/hyperfleet-api/container/container.go
  • docs/testcontainers.md
  • cmd/hyperfleet-api/server/routes_entities.go
  • pkg/config/loader.go

Comment thread pkg/closer/closer_test.go
Comment thread pkg/closer/closer_test.go Outdated
Comment thread test/helper.go Outdated
Comment thread test/helper.go Outdated
Comment thread test/helper.go
@kuudori
kuudori force-pushed the HYPERFLEET-1371-remove-environments branch from 0b0c4f8 to ce59e93 Compare August 6, 2026 14:39
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@kuudori
kuudori force-pushed the HYPERFLEET-1371-remove-environments branch from ce59e93 to e975068 Compare August 6, 2026 15:41
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (1)
pkg/config/tracing.go (1)

3-13: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Validate and wire TracingConfig

validateConfig does not call Tracing.Validate(). Add validation for an empty ServiceName when tracing is enabled, call it from validateConfig, and add tests. This prevents invalid service.name values (CWE-20).

Align the default: code, tests, and documentation use true, while the architecture standard and Helm chart use false.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/config/tracing.go` around lines 3 - 13, Update TracingConfig by adding a
Validate method that rejects an empty ServiceName when Enabled is true, then
invoke Tracing.Validate from validateConfig and add coverage for both valid and
invalid configurations. Reconcile the tracing Enabled default across
NewTracingConfig, tests, documentation, the architecture standard, and Helm
chart so every source uses the intended consistent value.

Sources: Path instructions, Linked repositories

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cmd/hyperfleet-api/server/api_server_test.go`:
- Around line 156-169: In cmd/hyperfleet-api/server/api_server_test.go:156-169,
synchronize on listener readiness with a bounded assertion before launching the
blocking request, retain and assert both Serve and request errors, and after
closing the server wait for both goroutines to complete. Apply the same
readiness synchronization, error retention/checking, and goroutine joins in
cmd/hyperfleet-api/server/api_server_test.go:201-206 so every asynchronous
operation has a bounded shutdown path.

In `@cmd/hyperfleet-api/server/server.go`:
- Line 52: Avoid reloading TLS files in the serving path: retain the certificate
validated around the existing TLS setup in httpServer.TLSConfig.Certificates,
then call ServeTLS with empty certificate and key paths. Ensure the same
validated certificate is used before readiness publication and preserve the
existing listener shutdown behavior.

In `@test/helper.go`:
- Line 375: Update the cached table construction used by getAllTables and the
TRUNCATE execution to use PostgreSQL identifier quoting via quote_ident, rather
than Go’s %q formatting. Ensure table names containing embedded double quotes
are escaped as PostgreSQL requires, and remove the existing %q-based quoting
loop while preserving the CASCADE truncation behavior.
- Around line 359-379: Synchronize all access to the package-level cachedTables
state: in test/helper.go lines 359-379, protect the nil-check and assignment in
Helper.ResetDB with a shared mutex (or initialize it through the existing
sync.Once in NewHelper); in test/helper.go lines 508-514, acquire that same
mutex before RebuildSchema clears cachedTables. Ensure both mutation paths use
the same synchronization mechanism.

---

Nitpick comments:
In `@pkg/config/tracing.go`:
- Around line 3-13: Update TracingConfig by adding a Validate method that
rejects an empty ServiceName when Enabled is true, then invoke Tracing.Validate
from validateConfig and add coverage for both valid and invalid configurations.
Reconcile the tracing Enabled default across NewTracingConfig, tests,
documentation, the architecture standard, and Helm chart so every source uses
the intended consistent value.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 6876c5f3-d284-48d1-b0ec-bb9e0c60ec39

📥 Commits

Reviewing files that changed from the base of the PR and between cf39733 and e975068.

⛔ Files ignored due to path filters (1)
  • test/support/jwt_ca.pem is excluded by !**/*.pem
📒 Files selected for processing (57)
  • AGENTS.md
  • CLAUDE.md
  • CONTRIBUTING.md
  • Makefile
  • charts/README.md
  • charts/templates/configmap.yaml
  • charts/values.yaml
  • cmd/hyperfleet-api/container/auth.go
  • cmd/hyperfleet-api/container/container.go
  • cmd/hyperfleet-api/container/container_test.go
  • cmd/hyperfleet-api/container/daos.go
  • cmd/hyperfleet-api/container/db.go
  • cmd/hyperfleet-api/container/validation.go
  • cmd/hyperfleet-api/environments/e_development.go
  • cmd/hyperfleet-api/environments/e_integration_testing.go
  • cmd/hyperfleet-api/environments/e_production.go
  • cmd/hyperfleet-api/environments/e_unit_testing.go
  • cmd/hyperfleet-api/environments/framework.go
  • cmd/hyperfleet-api/environments/framework_test.go
  • cmd/hyperfleet-api/environments/registry/registry.go
  • cmd/hyperfleet-api/environments/types.go
  • cmd/hyperfleet-api/servecmd/api_server.go
  • cmd/hyperfleet-api/servecmd/cmd.go
  • cmd/hyperfleet-api/server/api_server.go
  • cmd/hyperfleet-api/server/api_server_test.go
  • cmd/hyperfleet-api/server/health_server.go
  • cmd/hyperfleet-api/server/metrics_server.go
  • cmd/hyperfleet-api/server/routes_entities.go
  • cmd/hyperfleet-api/server/server.go
  • docs/authentication.md
  • docs/deployment.md
  • docs/development.md
  • docs/logging.md
  • docs/testcontainers.md
  • pkg/auth/auth_middleware.go
  • pkg/auth/identity.go
  • pkg/auth/jwt_handler.go
  • pkg/closer/closer.go
  • pkg/closer/closer_test.go
  • pkg/config/config.go
  • pkg/config/dump.go
  • pkg/config/health.go
  • pkg/config/loader.go
  • pkg/config/logging.go
  • pkg/config/logging_test.go
  • pkg/config/metrics.go
  • pkg/config/tracing.go
  • pkg/db/db_session/testcontainer.go
  • test/CLAUDE.md
  • test/helper.go
  • test/integration/advisory_locks_test.go
  • test/integration/caller_identity_test.go
  • test/integration/integration_test.go
  • test/mocks/jwk_cert_server.go
  • test/registration.go
  • test/support/certs.json
  • test/testdata/integration-config.yaml
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift-hyperfleet/architecture (manual)
  • openshift-hyperfleet/hyperfleet-api (manual)
  • openshift-hyperfleet/hyperfleet-sentinel (manual)
  • openshift-hyperfleet/hyperfleet-adapter (manual)
  • openshift-hyperfleet/hyperfleet-broker (manual)
💤 Files with no reviewable changes (12)
  • pkg/auth/identity.go
  • pkg/db/db_session/testcontainer.go
  • cmd/hyperfleet-api/environments/registry/registry.go
  • cmd/hyperfleet-api/environments/types.go
  • cmd/hyperfleet-api/environments/e_production.go
  • test/support/certs.json
  • cmd/hyperfleet-api/environments/e_integration_testing.go
  • cmd/hyperfleet-api/environments/framework_test.go
  • pkg/auth/auth_middleware.go
  • cmd/hyperfleet-api/environments/e_development.go
  • cmd/hyperfleet-api/environments/framework.go
  • cmd/hyperfleet-api/environments/e_unit_testing.go
🚧 Files skipped from review as they are similar to previous changes (40)
  • cmd/hyperfleet-api/container/validation.go
  • docs/deployment.md
  • CLAUDE.md
  • cmd/hyperfleet-api/container/db.go
  • test/registration.go
  • CONTRIBUTING.md
  • cmd/hyperfleet-api/container/daos.go
  • Makefile
  • test/integration/caller_identity_test.go
  • charts/values.yaml
  • docs/logging.md
  • pkg/auth/jwt_handler.go
  • test/integration/integration_test.go
  • charts/README.md
  • docs/authentication.md
  • docs/development.md
  • pkg/closer/closer.go
  • pkg/config/dump.go
  • cmd/hyperfleet-api/container/container.go
  • test/integration/advisory_locks_test.go
  • charts/templates/configmap.yaml
  • cmd/hyperfleet-api/container/auth.go
  • test/testdata/integration-config.yaml
  • cmd/hyperfleet-api/container/container_test.go
  • pkg/config/config.go
  • cmd/hyperfleet-api/server/routes_entities.go
  • cmd/hyperfleet-api/server/metrics_server.go
  • test/CLAUDE.md
  • pkg/config/metrics.go
  • cmd/hyperfleet-api/servecmd/api_server.go
  • docs/testcontainers.md
  • test/mocks/jwk_cert_server.go
  • cmd/hyperfleet-api/server/health_server.go
  • pkg/config/logging_test.go
  • pkg/config/loader.go
  • pkg/closer/closer_test.go
  • AGENTS.md
  • cmd/hyperfleet-api/server/api_server.go
  • cmd/hyperfleet-api/servecmd/cmd.go
  • pkg/config/health.go

Comment thread cmd/hyperfleet-api/server/api_server_test.go
Comment thread cmd/hyperfleet-api/server/server.go
Comment thread test/helper.go
Comment thread test/helper.go Outdated
@kuudori
kuudori force-pushed the HYPERFLEET-1371-remove-environments branch from e975068 to 29bb6c5 Compare August 6, 2026 15:56
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
test/helper.go (1)

413-427: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Return raw table names from getAllTables quote_ident can return quoted text for non-simple names. This breaks dependency matching and causes GORM's DropTable to quote the value again. Keep raw names in the slice and quote them only in the TRUNCATE statement.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/helper.go` around lines 413 - 427, Update Helper.getAllTables to select
raw tablename values instead of applying quote_ident, so dependency matching and
GORM DropTable receive unquoted names. Preserve the existing systemTables filter
and ordering, and retain identifier quoting only where names are used by the
TRUNCATE statement.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Line 66: Update the Startup wiring entry in AGENTS.md to remove the obsolete
servecmd.runServe sequence, name the current linear composition-root entry point
shown by the PR, and include pkg/closer shutdown wiring with LIFO ordering.
Preserve the existing startup component sequence where still applicable.

In `@cmd/hyperfleet-api/server/server.go`:
- Around line 85-90: Update baseServer.Shutdown and baseServer.Close to wrap
returned HTTP server errors with the server identity and operation name,
following the project's Error Model Standard rather than returning raw errors.
Preserve nil success behavior and ensure aggregated pkg/closer failures identify
which server and whether shutdown or close failed.

In `@pkg/config/tracing.go`:
- Line 19: Update the Enabled default in NewTracingConfig to false so
NewApplicationConfig produces disabled tracing unless explicitly enabled, while
preserving explicit configuration overrides.

In `@test/helper.go`:
- Around line 146-159: Update the setup failure paths in the surrounding test
helper to call c.Close() immediately before each panic: the migration error
branch after db.Migrate and the missing-JWT-config branch after
NewJWKCertServerMock. Preserve the existing panic messages and ensure cleanup
covers both the container session factory and JWK teardown.

---

Outside diff comments:
In `@test/helper.go`:
- Around line 413-427: Update Helper.getAllTables to select raw tablename values
instead of applying quote_ident, so dependency matching and GORM DropTable
receive unquoted names. Preserve the existing systemTables filter and ordering,
and retain identifier quoting only where names are used by the TRUNCATE
statement.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 0a97ef61-d14f-4f0b-8ee7-95ff31c51613

📥 Commits

Reviewing files that changed from the base of the PR and between cf39733 and 29bb6c5.

⛔ Files ignored due to path filters (1)
  • test/support/jwt_ca.pem is excluded by !**/*.pem
📒 Files selected for processing (57)
  • AGENTS.md
  • CLAUDE.md
  • CONTRIBUTING.md
  • Makefile
  • charts/README.md
  • charts/templates/configmap.yaml
  • charts/values.yaml
  • cmd/hyperfleet-api/container/auth.go
  • cmd/hyperfleet-api/container/container.go
  • cmd/hyperfleet-api/container/container_test.go
  • cmd/hyperfleet-api/container/daos.go
  • cmd/hyperfleet-api/container/db.go
  • cmd/hyperfleet-api/container/validation.go
  • cmd/hyperfleet-api/environments/e_development.go
  • cmd/hyperfleet-api/environments/e_integration_testing.go
  • cmd/hyperfleet-api/environments/e_production.go
  • cmd/hyperfleet-api/environments/e_unit_testing.go
  • cmd/hyperfleet-api/environments/framework.go
  • cmd/hyperfleet-api/environments/framework_test.go
  • cmd/hyperfleet-api/environments/registry/registry.go
  • cmd/hyperfleet-api/environments/types.go
  • cmd/hyperfleet-api/servecmd/api_server.go
  • cmd/hyperfleet-api/servecmd/cmd.go
  • cmd/hyperfleet-api/server/api_server.go
  • cmd/hyperfleet-api/server/api_server_test.go
  • cmd/hyperfleet-api/server/health_server.go
  • cmd/hyperfleet-api/server/metrics_server.go
  • cmd/hyperfleet-api/server/routes_entities.go
  • cmd/hyperfleet-api/server/server.go
  • docs/authentication.md
  • docs/deployment.md
  • docs/development.md
  • docs/logging.md
  • docs/testcontainers.md
  • pkg/auth/auth_middleware.go
  • pkg/auth/identity.go
  • pkg/auth/jwt_handler.go
  • pkg/closer/closer.go
  • pkg/closer/closer_test.go
  • pkg/config/config.go
  • pkg/config/dump.go
  • pkg/config/health.go
  • pkg/config/loader.go
  • pkg/config/logging.go
  • pkg/config/logging_test.go
  • pkg/config/metrics.go
  • pkg/config/tracing.go
  • pkg/db/db_session/testcontainer.go
  • test/CLAUDE.md
  • test/helper.go
  • test/integration/advisory_locks_test.go
  • test/integration/caller_identity_test.go
  • test/integration/integration_test.go
  • test/mocks/jwk_cert_server.go
  • test/registration.go
  • test/support/certs.json
  • test/testdata/integration-config.yaml
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift-hyperfleet/architecture (manual)
  • openshift-hyperfleet/hyperfleet-api (manual)
  • openshift-hyperfleet/hyperfleet-sentinel (manual)
  • openshift-hyperfleet/hyperfleet-adapter (manual)
  • openshift-hyperfleet/hyperfleet-broker (manual)
💤 Files with no reviewable changes (12)
  • cmd/hyperfleet-api/environments/registry/registry.go
  • test/support/certs.json
  • pkg/auth/identity.go
  • cmd/hyperfleet-api/environments/e_integration_testing.go
  • cmd/hyperfleet-api/environments/types.go
  • pkg/db/db_session/testcontainer.go
  • cmd/hyperfleet-api/environments/framework.go
  • cmd/hyperfleet-api/environments/e_unit_testing.go
  • cmd/hyperfleet-api/environments/e_production.go
  • pkg/auth/auth_middleware.go
  • cmd/hyperfleet-api/environments/framework_test.go
  • cmd/hyperfleet-api/environments/e_development.go
🚧 Files skipped from review as they are similar to previous changes (40)
  • cmd/hyperfleet-api/container/db.go
  • charts/templates/configmap.yaml
  • docs/deployment.md
  • CONTRIBUTING.md
  • cmd/hyperfleet-api/container/validation.go
  • docs/testcontainers.md
  • docs/authentication.md
  • cmd/hyperfleet-api/servecmd/api_server.go
  • pkg/config/dump.go
  • pkg/config/config.go
  • test/integration/advisory_locks_test.go
  • test/testdata/integration-config.yaml
  • charts/README.md
  • test/integration/caller_identity_test.go
  • pkg/auth/jwt_handler.go
  • test/mocks/jwk_cert_server.go
  • docs/development.md
  • Makefile
  • test/CLAUDE.md
  • cmd/hyperfleet-api/container/container_test.go
  • pkg/config/logging.go
  • pkg/closer/closer.go
  • cmd/hyperfleet-api/container/auth.go
  • charts/values.yaml
  • test/registration.go
  • pkg/config/logging_test.go
  • pkg/config/health.go
  • cmd/hyperfleet-api/server/metrics_server.go
  • cmd/hyperfleet-api/server/api_server.go
  • cmd/hyperfleet-api/server/routes_entities.go
  • pkg/config/loader.go
  • test/integration/integration_test.go
  • cmd/hyperfleet-api/container/container.go
  • pkg/closer/closer_test.go
  • cmd/hyperfleet-api/container/daos.go
  • cmd/hyperfleet-api/servecmd/cmd.go
  • cmd/hyperfleet-api/server/api_server_test.go
  • docs/logging.md
  • pkg/config/metrics.go
  • cmd/hyperfleet-api/server/health_server.go

Comment thread AGENTS.md Outdated
**Request flow**: Router -> Middleware (logging, auth, transaction) -> Handler -> Service -> DAO -> GORM -> PostgreSQL

Create feature branches from `main`. PRs target `main`.
- **Startup wiring**: `servecmd.runServe` loads config -> `container.NewContainer(cfg)` -> `BuildAPIServer(...)` -> `server.NewRouterFromConfig` + `server.NewAPIServer`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Remove the obsolete servecmd.runServe flow.

Line 66 still documents servecmd.runServe, but this PR replaces it with a linear composition root. Update the sequence to name the current entry point and include pkg/closer shutdown wiring. Otherwise, maintainers will follow a removed startup path.

As per PR objectives: “Replaces runServe with a linear composition root using pkg/closer for LIFO-ordered shutdown.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` at line 66, Update the Startup wiring entry in AGENTS.md to remove
the obsolete servecmd.runServe sequence, name the current linear
composition-root entry point shown by the PR, and include pkg/closer shutdown
wiring with LIFO ordering. Preserve the existing startup component sequence
where still applicable.

Comment thread cmd/hyperfleet-api/server/server.go Outdated
Comment thread pkg/config/tracing.go

func NewTracingConfig() *TracingConfig {
return &TracingConfig{
Enabled: true,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Disable tracing by default.

Because NewApplicationConfig() starts from NewTracingConfig(), an unset Tracing.enabled value becomes true. This conflicts with the architecture contract requiring tracing to default to false and can enable telemetry egress and runtime overhead without explicit opt-in. Treat this as CWE-16, Insecure Configuration.

Proposed fix
-		Enabled:     true,
+		Enabled:     false,

As per linked architecture findings: HYPERFLEET_TRACING_ENABLED defaults to false. As per path instructions: configuration changes affect all deployments.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Enabled: true,
Enabled: false,
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/config/tracing.go` at line 19, Update the Enabled default in
NewTracingConfig to false so NewApplicationConfig produces disabled tracing
unless explicitly enabled, while preserving explicit configuration overrides.

Sources: Path instructions, Linked repositories

Comment thread test/helper.go
@kuudori
kuudori force-pushed the HYPERFLEET-1371-remove-environments branch from 29bb6c5 to efa7b9a Compare August 6, 2026 21:08
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (2)
cmd/hyperfleet-api/server/server.go (1)

52-52: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

TLS files are still loaded twice.

Start validates the pair at Line 70. ServeTLS at Line 52 reads both files again. A change or removal between the two operations makes ServeTLS fail after close(s.listening) publishes readiness. This is CWE-367.

Store the validated tls.Certificate in httpServer.TLSConfig.Certificates and call ServeTLS(listener, "", "").

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmd/hyperfleet-api/server/server.go` at line 52, Update Start and the
ServeTLS call to reuse the validated tls.Certificate instead of rereading
certificate files: assign the validated certificate to
httpServer.TLSConfig.Certificates, then call ServeTLS with empty certificate and
key paths while preserving the existing readiness ordering.
test/helper.go (1)

145-156: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Setup panics still leak the PostgreSQL testcontainer.

abortSetup panics out of once.Do and therefore out of NewHelper. TestMain calls terminateContainer(ctx, pgContainer) only on the normal path, with no defer. Every abortSetup call at Lines 149, 155, and 171 leaves the container running (CWE-772). helper.closer never owns pgContainer.

Register the container termination in TestMain with defer, or pass the termination function into the helper closer before the first failure point.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/helper.go` around lines 145 - 156, Ensure PostgreSQL testcontainer
cleanup is registered before any setup can fail: update TestMain to defer
terminateContainer(ctx, pgContainer), or register that termination with the
helper closer before the abortSetup calls in NewHelper. Preserve cleanup for
both normal execution and panics from abortSetup.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@cmd/hyperfleet-api/server/server.go`:
- Line 52: Update Start and the ServeTLS call to reuse the validated
tls.Certificate instead of rereading certificate files: assign the validated
certificate to httpServer.TLSConfig.Certificates, then call ServeTLS with empty
certificate and key paths while preserving the existing readiness ordering.

In `@test/helper.go`:
- Around line 145-156: Ensure PostgreSQL testcontainer cleanup is registered
before any setup can fail: update TestMain to defer terminateContainer(ctx,
pgContainer), or register that termination with the helper closer before the
abortSetup calls in NewHelper. Preserve cleanup for both normal execution and
panics from abortSetup.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 1e2f2117-957a-46e2-a58d-4209c0e27db5

📥 Commits

Reviewing files that changed from the base of the PR and between cf39733 and efa7b9a.

⛔ Files ignored due to path filters (1)
  • test/support/jwt_ca.pem is excluded by !**/*.pem
📒 Files selected for processing (57)
  • AGENTS.md
  • CLAUDE.md
  • CONTRIBUTING.md
  • Makefile
  • charts/README.md
  • charts/templates/configmap.yaml
  • charts/values.yaml
  • cmd/hyperfleet-api/container/auth.go
  • cmd/hyperfleet-api/container/container.go
  • cmd/hyperfleet-api/container/container_test.go
  • cmd/hyperfleet-api/container/daos.go
  • cmd/hyperfleet-api/container/db.go
  • cmd/hyperfleet-api/container/validation.go
  • cmd/hyperfleet-api/environments/e_development.go
  • cmd/hyperfleet-api/environments/e_integration_testing.go
  • cmd/hyperfleet-api/environments/e_production.go
  • cmd/hyperfleet-api/environments/e_unit_testing.go
  • cmd/hyperfleet-api/environments/framework.go
  • cmd/hyperfleet-api/environments/framework_test.go
  • cmd/hyperfleet-api/environments/registry/registry.go
  • cmd/hyperfleet-api/environments/types.go
  • cmd/hyperfleet-api/servecmd/api_server.go
  • cmd/hyperfleet-api/servecmd/cmd.go
  • cmd/hyperfleet-api/server/api_server.go
  • cmd/hyperfleet-api/server/api_server_test.go
  • cmd/hyperfleet-api/server/health_server.go
  • cmd/hyperfleet-api/server/metrics_server.go
  • cmd/hyperfleet-api/server/routes_entities.go
  • cmd/hyperfleet-api/server/server.go
  • docs/authentication.md
  • docs/deployment.md
  • docs/development.md
  • docs/logging.md
  • docs/testcontainers.md
  • pkg/auth/auth_middleware.go
  • pkg/auth/identity.go
  • pkg/auth/jwt_handler.go
  • pkg/closer/closer.go
  • pkg/closer/closer_test.go
  • pkg/config/config.go
  • pkg/config/dump.go
  • pkg/config/health.go
  • pkg/config/loader.go
  • pkg/config/logging.go
  • pkg/config/logging_test.go
  • pkg/config/metrics.go
  • pkg/config/tracing.go
  • pkg/db/db_session/testcontainer.go
  • test/CLAUDE.md
  • test/helper.go
  • test/integration/advisory_locks_test.go
  • test/integration/caller_identity_test.go
  • test/integration/integration_test.go
  • test/mocks/jwk_cert_server.go
  • test/registration.go
  • test/support/certs.json
  • test/testdata/integration-config.yaml
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift-hyperfleet/architecture (manual)
  • openshift-hyperfleet/hyperfleet-api (manual)
  • openshift-hyperfleet/hyperfleet-sentinel (manual)
  • openshift-hyperfleet/hyperfleet-adapter (manual)
  • openshift-hyperfleet/hyperfleet-broker (manual)
💤 Files with no reviewable changes (12)
  • cmd/hyperfleet-api/environments/framework_test.go
  • cmd/hyperfleet-api/environments/framework.go
  • cmd/hyperfleet-api/environments/e_production.go
  • cmd/hyperfleet-api/environments/e_integration_testing.go
  • cmd/hyperfleet-api/environments/e_unit_testing.go
  • test/support/certs.json
  • cmd/hyperfleet-api/environments/types.go
  • pkg/auth/auth_middleware.go
  • cmd/hyperfleet-api/environments/registry/registry.go
  • cmd/hyperfleet-api/environments/e_development.go
  • pkg/db/db_session/testcontainer.go
  • pkg/auth/identity.go
🚧 Files skipped from review as they are similar to previous changes (38)
  • docs/logging.md
  • test/integration/advisory_locks_test.go
  • pkg/config/config.go
  • Makefile
  • cmd/hyperfleet-api/container/db.go
  • test/testdata/integration-config.yaml
  • pkg/config/dump.go
  • docs/authentication.md
  • pkg/closer/closer.go
  • pkg/config/health.go
  • docs/deployment.md
  • CONTRIBUTING.md
  • charts/README.md
  • CLAUDE.md
  • cmd/hyperfleet-api/container/auth.go
  • pkg/config/metrics.go
  • charts/templates/configmap.yaml
  • docs/testcontainers.md
  • test/CLAUDE.md
  • test/registration.go
  • pkg/auth/jwt_handler.go
  • test/mocks/jwk_cert_server.go
  • docs/development.md
  • test/integration/caller_identity_test.go
  • cmd/hyperfleet-api/server/routes_entities.go
  • cmd/hyperfleet-api/container/container_test.go
  • test/integration/integration_test.go
  • pkg/config/tracing.go
  • pkg/config/logging.go
  • pkg/closer/closer_test.go
  • cmd/hyperfleet-api/container/validation.go
  • cmd/hyperfleet-api/container/daos.go
  • pkg/config/logging_test.go
  • cmd/hyperfleet-api/servecmd/cmd.go
  • cmd/hyperfleet-api/server/api_server.go
  • cmd/hyperfleet-api/server/api_server_test.go
  • charts/values.yaml
  • cmd/hyperfleet-api/servecmd/api_server.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant